home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / assembly / trashed1.lzh / trashEd1.0 / trashEd.patch.readme < prev    next >
Text File  |  1995-10-06  |  8KB  |  216 lines

  1.          TrashEd (Trash'm-One2.0 patch by Jesper Skov)
  2.          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Disclaimer
  4. ~~~~~~~~~~
  5.  
  6. The author cannot be held liable for the suitability or accuracy of this
  7. manual and/or the program(s) it describes. Any damage directly or indirectly
  8. caused by the use or misuse of this manual and/or the program it describes is
  9. the sole responsibility of the user her/him self.
  10.  
  11. This package *only* contains the patch file. The original Trash'm-One2.0
  12. executable you'll have to find yourself. *Do not* ask me for a copy! I will
  13. not distribute the trashEd executable as I'm not sure about the copyright
  14. status of Trash'm-One2.0 (IMHO both Trash'm-One and TFA's ASM1 are so far
  15. from the original Asm-One (which I BTW have an original copy of!) that there
  16. shouldn't be a problem).
  17.  
  18. You may find that this text is a bit... um, "colored" by my use of FrexxEd.
  19. If you think that could be a problem, stop reading now! I made this patch for
  20. personal use but was encouraged to release it. If you have not seen trashEd
  21. in "action" with FrexxEd or another editor (which would be with an interface
  22. not made by me), don't complaint about the usability of trashEd... In that
  23. case I simply don't care!
  24.  
  25. If you can't get things working by following the instructions in this file,
  26. please don't get mad. It's quite hard describing this process... If you have
  27. any questions you're welcome to send me an Email!
  28.  
  29.  
  30. Copyright
  31. ~~~~~~~~~
  32. Not much to copyright but anyway: This patch is © copyright 1995 Jesper Skov.
  33.  
  34. You may use it for free, but I'd appreciate if you'd consider sending me a
  35. postcard with some flattering text :)  You could also send me a SF paperback
  36. (or hardcover ;) book, but please check the title with me by Email if you
  37. choose to be this heroic. I hate doublets. Thanks.
  38.  
  39.  
  40. Overview
  41. ~~~~~~~~
  42. If you are using the Asm-One/Trash'm-One assembler on a daily basis, you
  43. might want to use this patch which will enable you to use FrexxEd (or any
  44. other editor with ARexx support) for editing the sources. What this boils
  45. down to is an improved editor environment without loosing all the
  46. monitor/control/debugging options in Trash'm-One.
  47.  
  48. There is one catch: you might be a bit annoyed with the slower editor
  49. entry/exit times. However, I've been using the system for some time now and
  50. it is not a problem at all! (A4000/25MHz'o3o/8MB FAST)
  51.  
  52. This package consists of several elements:
  53.  
  54.  o A Trash'm-One2.0 patch; will change a few things in Trash'm-One2.0,
  55.    "trashing" it into trashEd :)
  56.  
  57.  o activateTrashEd; offers communication from external applications to
  58.    trashEd. The (simple) interface is described below.
  59.  
  60.  o trashToFront; will pop trashEd to front.
  61.  
  62.  o getTrashValues; is used to extract information from the running trashEd.
  63.  
  64.  o popTrashEd.rexx; should be located in "env:arexx/". Is called by trashEd
  65.    to activate the external editor.
  66.  
  67.  o TrashEdMode.FPL; Example script for the editor FrexxEd (programmed in
  68.    FPL, a language very much like C. I don't even think you have to know
  69.    C to be able to read it: it's very simple... and commented :P ).
  70.  
  71.  
  72. Installing
  73. ~~~~~~~~~~
  74. The first thing you need to do is patching the Trash'm-One2.0 executable.
  75. Follow the steps below;
  76.  
  77. 0) Even though you don't use FrexxEd, you should install it to check out what
  78.    is possible with trashEd (the unregistered FrexxEd will do just fine!).
  79.    If you don't do that, you'll have to do some editing and Arexx programming
  80.    for your editor before you can see trashEd working!
  81.  
  82. 1) Copy the Trash'm-One2.0 executable to "RAM:in". The file has to be 127880
  83.    bytes long, and there will be made a CRC check. If the file does not have
  84.    the right length, or the CRC differs, there will be no patching done!
  85.  
  86. 2) run the patchTrashEd command.
  87.  
  88. 3) If there is a file called "out" in RAM: with length 127880, the patching
  89.    succeded. There are no error messages, but if you did as described in step
  90.    1/2 there would only be a problem if you don't have the correct
  91.    Trash'm-One2.0 file.
  92.  
  93. 4) Rename this file to something like "trashEd" and put it on your (hard)disk.
  94.  
  95. 5) Put the files "activateTrashEd;trashToFront;getTrashValues" in "c:".
  96.    You might want to make them resident in your startup so as to reduce
  97.    editor entry/exit times.
  98.  
  99. 6) If not already there; make a directory called "ARexx" in "envarc:". Put
  100.    the file "popTrashEd.rexx" there. This file is made for FrexxEd. If you
  101.    use another editor you need to change the file!!!!!
  102.  
  103. 7) Correct the preferences: Start Trash'm-One and make sure that
  104.     - Marks are *not* saved.
  105.     - (Assembling will be done with "All Errors". See below!) 
  106.  
  107.    After saving the preference file, you should add something like
  108.    "\f\2000\" at the bottom of the preference file. This will allocate 2000KB
  109.    of FAST memory at startup and enter the server mode (try starting trashEd
  110.    without this line and you'll see the point).
  111.  
  112. 8) Copy TrashEdMode.FPL to "FPL:". Make FrexxEd execute ("ExecuteFile()")
  113.    this file at startup (you could add it to "user.fpl").
  114.  
  115. That should be it.
  116.  
  117.  
  118. Using trashEd
  119. ~~~~~~~~~~~~~
  120. (This section is a bit messy. Sorry. :)
  121.  
  122.  
  123. Start trashEd from WorkBench. If it entered server mode (should say
  124. "Awaiting command..") it should be ready to accept commands via the
  125. activateTrash tool:
  126.  
  127. FILENAME - Specify a file to load.
  128.  
  129. ASSEMBLE - Start assembling immediately after loading the file.
  130.  
  131. ADDRESS  - Will make trashEd write two addresses (binary) to "T:TrashAdd".
  132.            These can be used with the getTrashValues tool.
  133.  
  134. QUIT     - Make trashEd quit.
  135.  
  136.  
  137. When trashEd is not in server mode, the only difference from Trash'm-One is
  138. the ESC key. Pressing it will invoke the external editor (by executing the
  139. "env:arexx/popTrashEd.rexx" script) and make trashEd enter server mode. You
  140. may still use the internal editor by pressing CTRL-ESC.
  141.  
  142. When assembling a log will be made in "T:trashLog". This can be used to
  143. identify erroneous lines by the editor! (see the FrexxEd example)
  144.  
  145. If you have enabled "All Errors", the external editor will be invoked at the
  146. end of assembling. If the flag is not enabled, trashEd will remain activated.
  147.  
  148.  
  149. That should be enough info to get a simple interface running;
  150.  
  151. o Make the editor execute "activateTrash" when e.g. ESC is pressed.
  152. o Make the popTrashEd.rexx script activate the editor.
  153.  
  154.  
  155.  
  156. To make the interface more dynamic I added the possibility of reading the
  157. status of trashEd. This may be done with the "getTrashValues" tool. It
  158. requires the addresses supplied by the "activateTrash" tool. Example:
  159.  
  160. activateTrash address            (Will get the needed addresses)
  161. getTrashValues                (Will put the status in the variable
  162.                      "trashStat")
  163. getenv trashstat            (Print the status string)
  164.  
  165. You only need to find the addresses once (e.g. when trashEd is started) as
  166. the address does not change during operation.
  167.  
  168.  
  169. The status string has the following format:
  170.  
  171. <status><assembly% (0-200)>
  172.  
  173. where status may be:
  174.  
  175. a - Assembling (the only state where the assembly% has any meaning).
  176. f - Assembling failed (trashEd in server mode).
  177. o - Assembling OK.
  178. u - User has control.
  179. w - Waiting for external command (i.e. trashEd is in server mode).
  180.  
  181.  
  182. In the FrexxEd interface I don't pop trashEd until the assembly has succeded.
  183. If it didn't (i.e. status = f) I parse the log file and present the user with
  184. an error message. While assembling, I use the a<a%> status to make a progress
  185. bar. Check it out!
  186.  
  187.  
  188. Known bugs/problems
  189. ~~~~~~~~~~~~~~~~~~~
  190.  If trashEd is started from CLI it will *not* work! (use WB start)
  191.  
  192.  If you are unlucky, trashEd will hang the first time it is activated with an
  193.  ASSEMBLE command. This is (apparently) because some of the initialization in
  194.  trashEd is skipped in this startup method. It could be fixed if I had more
  195.  space. 
  196.  (FrexxEd notes: If you always enter trashEd the *first* time with shift-ESC,
  197.  you circumvent the problem!)
  198.  
  199.  Don't use all the "RUNE/PROMAX/TFA/etc" commands in trashEd as they will most
  200.  likely make a mess of your screen.
  201.  
  202.  
  203. Author address
  204. ~~~~~~~~~~~~~~
  205. Jesper Skov
  206. Sallingsundvej 47 st th
  207. DK-9220 Aalborg Ø
  208. Denmark
  209.  
  210. Email: jskov@iesd.auc.dk
  211.  
  212. WWW:   http://www.iesd.auc.dk/~jskov
  213.  
  214. PS: Let me stress; DON'T send me letters/Email, asking for a copy of
  215.     Trash'm-One2.0! It's of no use!
  216.